package com.example.linuxweb.model;

public class FileSystem {
    private FileNode root;
    private FileNode currentDirectory;

    public FileSystem() {
        this.root = new FileNode("", true);
        this.currentDirectory = root;

        // Initialize basic file system structure
        FileNode home = new FileNode("home", true);
        root.addChild(home);

        FileNode user = new FileNode("user", true);
        home.addChild(user);

        currentDirectory = user;
    }

    public FileNode getRoot() {
        return root;
    }

    public FileNode getCurrentDirectory() {
        return currentDirectory;
    }

    public void setCurrentDirectory(FileNode currentDirectory) {
        this.currentDirectory = currentDirectory;
    }
}